#include "info.h"
#include "re.h"
#include "utils.h"

void antikick_m(char *reciev) {

	char match[512];

	sprintf(match,"^:([^ ]+)!([^ ]+)@[^ ]+ KICK ([^ ]+) %s :(.+)$",info.nick);
	if(matcher(match, reciev, re_vector)==0) {

	ERCPY(re_vector,1,buffer[0],reciev);
	ERCPY(re_vector,3,buffer[1],reciev);
	ERCPY(re_vector,4,buffer[2],reciev);

	ssock(info.fd, "JOIN %s\r\n", buffer[1]);
	ssock(info.fd, "PRIVMSG %s :%s, (%s) akih _!_ pra vc =/\r\n", buffer[1], buffer[0], buffer[2]);

	}

}

void onebot_m(char *reciev) {

	antikick_m(reciev);

}
